* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
}

.mainapp {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.mainapp-header {
  padding: 20px;
  background-color: #42b983;
  color: white;
  text-align: center;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mainapp-header h1 {
  margin: 0;
}

.login-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-section button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background-color: #fff;
  color: #42b983;
  font-weight: bold;
}

.login-section button:hover {
  background-color: #f0f0f0;
}

.mainapp-nav {
  display: flex;
  justify-content: center;
  padding: 10px;
  background-color: #f0f0f0;
  flex-wrap: wrap;
}

.mainapp-nav a {
  display: inline-block;
  padding: 10px 20px;
  margin: 0 10px;
  text-decoration: none;
  color: #333;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.mainapp-nav a:hover {
  background-color: #ddd;
}

/* 下拉菜单样式 */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  left: 0;
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  margin: 0;
  border-radius: 0;
}

.dropdown-content a:hover {
  background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
  display: block;
}

#subapp-container {
  flex: 1;
  overflow: auto;
  padding: 20px;
}

#subapp-viewport {
  height: 100%;
}

/* 登录模态框样式 */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  width: 300px;
  position: relative;
}

.close {
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 24px;
  cursor: pointer;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
}

.form-group input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.form-group button {
  width: 100%;
  padding: 10px;
  background-color: #42b983;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.form-group button:hover {
  background-color: #359c6d;
}

/* 隐藏元素的样式 */
.hidden {
  display: none;
}

#user-info {
  display: none;
}

#login-modal {
  display: none;
}
